const {Result} = require('../connect');
const express = require('express')
const router = express.Router()
const aliApi = require("../minialiplay");

router.post("/", async (req, res) => {
  try {
    let r1 = await aliApi.accToken(req.body);
    let r2 = await aliApi.userInfo(r1);
    res.json(r2);
  }
  catch (e) {
    console.log(e);
  }
});


router.get('/navigate',(req,res)=>{
	res.send("<a href='/login/navigate'>login-navigate</a><br/><a href='/usersinfo/navigate'>usersinfo-navigate</a>")
})

module.exports = router;